package com.ziroom.crm.mq.rabbit.spring.core;

import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;

/**
 * 容器工厂
 *
 * @author WeiShaoying
 * @version 1.0
 * @date Created in 2020年09月06日 14:55
 * @since 1.0
 */
public class ReliableRabbitListenerContainerFactory extends SimpleRabbitListenerContainerFactory {

    /**
     * 创建一个没有 MessageListener 或 队列 的MessageListenerContainer
     *
     * @return SimpleMessageListenerContainer
     */
    @Override
    public SimpleMessageListenerContainer createListenerContainer() {
        return new ReliableMessageListenerContainer();
    }

    /**
     * 创建容器
     *
     * @return SimpleMessageListenerContainer
     */
    @Override
    protected SimpleMessageListenerContainer createContainerInstance() {
        return new ReliableMessageListenerContainer();
    }

}
